﻿@{
    ViewBag.Title = "Index";
}
<link href="~/Content/css/framework-theme.css" rel="stylesheet" />
<link href="~/Content/select2/select2.min.css" rel="stylesheet" />
<script src="~/Content/select2/select2.min.js"></script>

@this.RefStyle("~/Content/webuploader/webuploader.css")
@this.RefScript("~/Content/webuploader/webuploader.js")
@Html.Partial("Index_js")
<style type="text/css">
        /*
    .img_thum {max-width:100px;}*/
</style>
<style type="text/css">
    #picker {
        display: inline-block;
        line-height: 10px;
        vertical-align: middle;
        margin: 0 12px 0 0;
    }

    .img_thum {
        width: 100px;
        margin-right: 5px;
    }

    .img_red {
        border: 1px solid #ff6a00;
    }

    #thelist {
        overflow-y: hidden;
        overflow-x: scroll;
    }
</style>
<div style="width:100%;">
    <div class="topPanel">
        <div class="toolbar">
            <a class="a-btn-refresh" onclick="$ace.reload()"></a>
            <button class="a-btn-edit" data-bind="click:edit,disable:!dataTable.selectedModel()">修改</button>
            <button class="a-btn-add" data-bind="click:add">添加</button>
             
            <button class="a-btn-delete" data-bind="click:del,disable:!dataTable.selectedModel()">删除</button>
        </div>
        <div class="search">
            <table class="form-table" style="width:auto;">
                <tr>                    
                     
                    <td>
                        <input type="text" class="a-control" placeholder="请输入要查询关键字" style="width: 200px;" data-bind="value:searchModel().keyword">
                    </td>
                    <td>
                        <button type="button" class="a-btn-search" data-bind="click:search"></button>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div>
        <table class="table table-hover" data-bind="with:dataTable">
            <thead>
                <tr>
                    <th style="width:20px;"></th>
                    <th>品牌名称</th>
                    <th>品牌图片</th>
                    <th>简介</th>
                    <th>置顶</th>
                    
                </tr>
            </thead>
            <tbody data-bind="foreach:models">
                <tr data-bind="click:$parent.selectRow">
                    <td data-bind="text:Id"></td>
                    <td data-bind="text:Title"></td>
                    <td data-bind="text:ImageUrl"></td>
                    <td data-bind="text:Remark"></td>
                    <td><span data-bind="text:IsTop()?'是':'否',attr:{class:IsTop()?'a-span-success-s':'a-span-danger-s'}"></span></td>
                </tr>
            </tbody>
            @Html.Partial("_tfoot")
        </table>
    </div>
</div>

<dialogbox data-bind="with:dialog" style="width:80%;">
    <form id="form1">
          
            <table class="form-table">
                <tbody>
                    <tr>
                        <td class="form-title">品牌名称</td>
                        <td class="form-value"><input name="Title" type="text" class="a-control required" placeholder="" data-bind="value:model().Title" /></td>

                    </tr>
                    <tr>
                        <td class="form-title">品牌简介</td>
                        <td class="form-value">
                            <input name="Remark" id="Remark" type="text" class="a-control required" placeholder="" data-bind="value:model().Remark" />
                        </td>
                    </tr>
                    <tr>
                        <td class="form-title">品牌图片</td>
                        <td class="form-value">
                            <div id="uploader" class="wu-example" style="z-index:99999;">
                                <div class="btns">
                                    <div id="picker">选择文件</div>
                                </div>
                                <div id="thelist" class="uploader-list"></div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input name="ImageUrl" id="ImageUrl" type="text" class="a-control required" data-bind="value:model().ImageUrl" /></td>
                    </tr>

                    <tr>
                        <td class="form-title">置顶</td>
                        <td class="form-value">
                            <input id="IsTop1" class="a-radio" name="TopType" type="radio" value="1" data-bind="typedChecked:model().IsTop,dataType:'int'"><label for="IsTop1">是</label>
                            <input id="IsTop0" class="a-radio" name="TopType" type="radio" value="0" data-bind="typedChecked:model().IsTop,dataType:'int'"><label for="IsTop0">否</label>
                        </td>
                         
                    </tr>

                </tbody>
            </table>

        
        
    </form>
</dialogbox>

<script type="text/javascript">
    jQuery(function () {
         
    });
    
</script>
